With the advent of digital cameras, there has been an increased need for enhancements to the operation of these cameras. The first digital cameras utilized a fixed focus lens with only digital zoom capabilities. As the digital cameras were accepted and price reductions occurred, additional features were provided for the digital cameras such as optical zoom capabilities. Additionally, there was a need to provide at least manual focusing for these cameras, if not auto focus capabilities.
For the current digital cameras, the auto focus capabilities require some type of motor to facilitate such auto-focus capabilities. As the cameras become smaller, the motors become smaller and more efficient and the batteries become smaller. Thus, there is a need for very efficient control circuitry to control these small motors.
Microcontrollers are utilized to generate the digital values to control digitally controlled motors for the auto-focus feature. In order to provide for low power operation, the lower power microcontrollers have the ability to enter sleep modes, reduce the number of instructions that are executed, etc., to conserve power. However, if a microcontroller is required to both service operations such as calculating the stepper motor pattern and also update the output of the stepper motor, this can provide some issues with respect to synchronization. For example, if the microcontroller is required to output more bits of information than the width of the instruction, then it requires more than one instruction to generate the output instruction. For example, if an 8-bit microcontroller is required to change the state of more than one port, it will then require two or more instructions to specify the output. This will result in the fact that all the pins are not synchronized. Further, when a timer is utilized to generate an interrupt for each stepper motor update in a synchronized system, the microcontroller may not be able to execute the instructions necessary to service the interrupt in a synchronized manner, due to the fact that the microcontroller may be in the middle of servicing another sub-routine, which must be completed before entering the interrupt service routine which is utilized to change the output value. Multi-cycle instructions or other pending interrupts will then create a latency uncertainty. The amount of time the microcontroller requires between receiving the timer interrupt to the execution of the instruction for the pin update can therefore vary from update to update. Additionally, each instruction that is executed by a microcontroller requires processing power which then requires consumption of power. In order to execute all the necessary instructions, it may be necessary to actually utilize a faster processor which translates into more power. The trend in low power applications is to use a slower processor and to offload the processing to external circuitry. Further, if the processor is required to be active during all of the sub-routines, this will result in the processor being inhibited from going into a power-saving mode.